<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>{:C('SERVER_NAME')}</title>
	<link rel="stylesheet" type="text/css" href="__PUBLICADMIN__/css/style.css">
	<style type="text/css">
		.form-fl{
			float: left;
			margin-top: 40px;
		}
		.form-low{
			overflow: hidden;
			margin:10px 0;
		}
		.content .form-text {
		   width: 360px;
		}
		.content .form-text input{
		   width: 360px;
		}
		.look-content1{
			position: absolute;
			left: 50%;
			top: 50%;
			background: #fff;
			transform: translateX(-50%) translateY(-50%);
			border-radius:5px;
			overflow: hidden;
			border: 1px solid #ccc;
			padding: 40px;
			display: none;
		}
		.look-shut{
			position: absolute;
			right: 10px;
			top: 10px;
			cursor: pointer;
		}
		.look-content1 .form-group{
			padding:10px;
			overflow: hidden;
		}
		.look-content1 .form-title{
			
			line-height: 40px;
			display: block;
			
		}
		.look-content1 .form-text{
			display: block;
			width: 360px;
			height: 40px;
			border-radius: 10px;
			border: 1px solid #979797;
			
		}
		.look-content1 .form-text input{
			border: none;
			outline: none;
			background: transparent;
			width: 100%;
			height: 35px;
			line-height: 35px;
			text-indent: 10px;
		}
		.look-content1 .form-btn{
			width: 60px;
			height: 35px;
			line-height: 35px;
			background: #3a98d8;
			color: #fff;
			border-radius: 10px;
			border: none;
			outline: none;
			cursor: pointer;
			text-align: center;
		}
		

	</style>
</head>
<body>
	<div class="content p50">
		<div class="content-title"><h2>新闻订单详情</h2></div>
		<div class="p80">
			<div class="change">
				<div class="form-group"><span class="form-title">标题：</span><span class="span-text">{$orderInfo.news_title}</span></div>
				<div class="form-group"><span class="form-title">类型：</span><span class="span-text"><if condition="$orderInfo.type eq '1'">套餐：{$orderInfo.package_name}<else/>自选</if></span></div>
				<div class="form-group"><span class="form-title">价格：</span><span class="span-text">{$orderInfo.order_price}</span></div>
				<div class="form-group">
					<span class="form-title">新闻源：</span>
					<span class="span-text"><a href="javascript:;" class="download">查看</a></span>
				</div>
				
				<div class="form-group"><span class="form-title">内容：</span>{$orderInfo.news_content}</div>
				<div class="form-group"><span class="form-title">审核：</span><span class="form-title search-select">
				<select name="apply" id="apply">
					<option value="0">请选择</option>
					<if condition="$orderInfo.is_apply eq '0'"><option value="1">通过</option>
					<option value="2">不通过</option></if>
					<if condition="$orderInfo.is_apply eq '1'"><option value="3">完成</option></if>
				</select>
				</span><span><span class="form-title">(<if condition="$orderInfo.is_ok eq '1' ">已完成<elseif condition="$orderInfo.is_ok eq '0' and $orderInfo.is_apply eq '1' " />进行中<elseif condition="$orderInfo.is_apply eq '2' "/>未通过<else/>未审核</if>)<br/>{$orderInfo.reason}</span></span></div>
			</div>
		</div>	

	</div>

	<div class="look-content1 newslist">
		<div class="look-shut"><img src="__PUBLICADMIN__/images/close.png"></div>
		<form action="__URL__/feedback" method="post">
		<volist name="newsList" id="vo">
			<div class="form-group"><span class="form-title">{$vo.news_name}：</span><div class="form-text"><input type="text" name="case_urls[]" placeholder="案列地址" value="{$vo.news_feedback}"></div></div>
			<input type="hidden" value="{$vo.id}"  name="ids[]">
		</volist>
		<input type="hidden" value="{$orderInfo.id}"  name="id">
		<div class="form-group" style="text-align:center"><input type="submit" name="" value="提交" class="form-btn"></div>
		</form>
	</div>

	<div class="look-content1 reason">
		<div class="look-shut"><img src="__PUBLICADMIN__/images/close.png"></div>
			<div class="form-group"><textarea id="reasonInfo" placeholder="请输入理由" rows="10"></textarea></div>
			<div class="form-group" style="text-align:center"><input type="button" name="" value="提交" class="form-btn" id="toReason"></div>
	</div>
	<include file="Public/okcancel" />
	<script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.min.js"></script>
	<script type="text/javascript" src="__PUBLICADMIN__/js/page.js"></script>
	<script type="text/javascript">
		$(".download").on("click",function () {
			$(".newslist").show();
		})
		$(".look-shut").on("click",function () {
			$(".newslist").hide();
		})
		$(".search-select select").on("change",function(){
				var state=$("#apply").val();
				var id="{$orderInfo.id}";
				if(state==2){
					$(".reason").show();
					$("#toReason").on("click",function(){
						var reasonInfo=$("#reasonInfo").val();
						ajaxState(id,state,reasonInfo);
					});
				}else{
					ajaxState(id,state);
				}
		});


		function ajaxState(id,state,reason){

			$.post('__URL__/ajaxState',{id:id,state:state,reason:reason}, function(data) {
				
				if(data=='1'){
					modelConfirm("操作成功",function(){
						window.location.reload();
					});
					
				}else{
					modelConfirm("操作失败");
				}
			});

		}
	</script>
</body>
</html>